﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

using gfPage;
using gfLibrary;
using DBUtility;
using Config;
using Model;
using BLL;
using System.Data.SqlClient;
using UtilityHelper;
using System.Diagnostics;

namespace GreatGF
{
    public partial class WebLog_Clear : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
             gfAjaxJs.SetNoCache();

             if (Page.IsPostBack == false)
             {
                
             }
        }

        protected void btnClear_Click(object sender, EventArgs e)
        {
            ClearHistortLog();
       
            gfAjaxJs.SetAlertMsg(this.UpdatePanel1, "清除成功！");
        }

        private void ClearHistortLog()
        {
            try
            {
                DbStoredProcedure dbStoreHelper = new DbStoredProcedure();
                SqlParameter[] param = new SqlParameter[] { };
                dbStoreHelper.RunProc("proc_DeleteHistoryLog", param);
                string funName = string.Format("{0}.aspx.cs -> {1}", System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name, (new StackTrace()).GetFrame(0).GetMethod().Name);
                  IYAKASAPortal.Statistics.StaInfoTools.WriteLogMsg("", "清除了Web系统日志","" ,LogHelper.LogType.Normal, funName);
            }
            catch (Exception ex)
            { 
            }
        }

    
    }
}
